﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ESP.Data
{
    /// <summary>
    /// this is command infomation
    /// </summary>
    public class CommandInfo
    {
        public string CommandText { get; private set; }

        public CommandType CommandType { get; private set; }

        public List<IDataParameter> Parameters { get; private set; }

        internal CommandInfo(string commandText, CommandType commandType, List<IDataParameter> parameters)
        {
            this.CommandText = commandText;
            this.CommandType = commandType;
            this.Parameters = parameters;
        }

        /// <summary>
        ///  Overloading CommandType default Text
        /// </summary>
        /// <param name="commandText"></param>
        /// <param name="parameters"></param>
        internal CommandInfo(string commandText, List<IDataParameter> parameters)
            : this(commandText, CommandType.Text, parameters)
        {

        }
    }
}
